package com.xszn.middleware.util;

import javax.websocket.Session;

public class CommenUtil {

    /**
     * 获取 设备的 id
     * @return
     */
    public static String getSessionId(Session session){

        return session.getRequestParameterMap().get("SerialNo").get(0);
    }


    public static void keepLive(Session session, String msg){

        WebSocketUsers.sendMessageToUserByText(session, "pong");

    }
}
